package com.dchh.android.suverynew.presenter.impl;

import com.dchh.android.suverynew.presenter.IWelcomePresenter;
import com.dchh.android.suverynew.view.ICommonView;
import com.dchh.android.suverynew.view.IWelcomeView;
import com.dhcc.android.base.utils.Constants;
import com.dhcc.android.base.utils.version.UpdataInfo;

/**
 * Created by eric on 2016/8/6.
 */
public class WelcomePresenter extends CommonPresenter implements IWelcomePresenter {
    private IWelcomeView mWelcomeView;

    public WelcomePresenter(IWelcomeView welcomeView) {
        super((ICommonView) welcomeView);
        mWelcomeView = welcomeView;
    }

    @Override
    public void checkVersion() {
        mCommonModule.checkVersion();
    }

    @Override
    public void onCheckVersionSuccess(UpdataInfo updataInfo) {
        Constants.needUpdate = true;
        Constants.info = updataInfo;
        this.mWelcomeView.onCheckSuccess(updataInfo);
    }
}
